package com.game.centerserver.service.impl;

import com.game.centerserver.infrastructure.entity.Product;
import com.game.centerserver.infrastructure.service.ProductService;
import com.game.centerserver.service.ProductServiceService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: tian
 * @Date: 2024/11/19/16:06
 * @Description:
 */
@Service
public class ProductServiceServiceImpl implements ProductServiceService {

    @Resource
    private ProductService productService;
    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public Product queryById(Integer id) {
        return this.productService.queryById(id);
    }


    /**
     * 新增数据
     *
     * @param product 实例对象
     * @return 实例对象
     */
    @Override
    public boolean insert(Product product) {
        return false;
    }

    /**
     * 修改数据
     *
     * @param product 实例对象
     * @return 实例对象
     */
    @Override
    public boolean update(Product product) {

        return this.productService.update(product);
    }

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer id) {
        return this.productService.deleteById(id);
    }
}
